/*
 * rentStuff.java
 *
 * Created on April 6, 2007, 1:17 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package edu.byu.isys413.actions;

import javax.swing.JComponent.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.swing.JOptionPane;

public class rentStuff implements edu.byu.isys413.web.Action {
    
    /** Creates a new instance of rentStuff */
    public rentStuff() {
    }
  
    /** Processes a request for rentals of a certain type */
    public String process(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpSession session = request.getSession();
               
        String type = "";
        if(request.getParameter("group1").equals("Camera"))type="Camera"; //read cameras from database, and display them.
        if(request.getParameter("group1").equals("Tripod"))type="Tripod";
        if(request.getParameter("group1").equals("Video"))type="Video Camera";
        if(request.getParameter("group1").equals("Projector"))type="Projector";
        
        request.setAttribute("message","You selected "+type);
        
        return "rentStuff.jsp";
    }//process
        
}//rentStuff class
